package com.zry.yard.ui.activity

import com.zry.yard.R
import com.zry.yard.been.StoreOrderBean
import com.zry.yard.databinding.ActivityPutStorageRecordListBinding
import com.zry.yard.presenter.PutStorageRecordListPresenter
import com.zry.yard.ui.base.BaseActivity
import kotlinx.android.synthetic.main.common_title.*


class PutStorageRecordListActivity : BaseActivity() {
    private var putStorageRecordListBinding: ActivityPutStorageRecordListBinding? = null
    private var putStorageRecordListPresenter: PutStorageRecordListPresenter? = null
    var title = ""

    var pageStoreIndex = 1
    var pageSize = 10


    var productID = ""
    var orderState = ""
    var orderCode = ""
    var storeOrderList: MutableList<StoreOrderBean>? = null


    override fun getLayoutId(): Int {
        return R.layout.activity_put_storage_record_list
    }

    override fun initData() {
        title = intent.getStringExtra("title")


        titleCenterText.text = "入库单列表"
        commonLeftLinearLayout.setOnClickListener { finish() }

        storeOrderList = mutableListOf()


        putStorageRecordListBinding = viewDataBinding as ActivityPutStorageRecordListBinding
        putStorageRecordListPresenter = PutStorageRecordListPresenter(this)
        putStorageRecordListBinding?.handlerClick = putStorageRecordListPresenter


        putStorageRecordListPresenter?.initRecycler()
        pageStoreIndex = 1
        storeOrderList!!.removeAll(storeOrderList!!)
        putStorageRecordListPresenter?.getPutStorageList("", "", "", pageStoreIndex, pageSize)
    }

}



